﻿using System.Windows.Input;
using Monti.MVVM;

namespace Peter.Common
{
   /// <summary>
   /// Represents a toolbar item.
   /// </summary>
   public class PeterToolbarItem : ViewModelBase
   {
      private string m_Text;
      private string m_IconUrl;

      /// <summary>
      /// Creates a new menu item.
      /// </summary>
      /// <param name="text">Title of menu item.</param>
      public PeterToolbarItem (string text)
      {
         this.Text = text;
      }

      /// <summary>
      /// Gets or Sets the header of the menu item.
      /// </summary>
      public string Text
      {
         get { return this.m_Text; }
         set
         {
            this.m_Text = value;
            this.RaisePropertyChanged ("Text");
         }
      }

      /// <summary>
      /// Gets or Sets the url of the icon for the menu item.
      /// </summary>
      public string IconUrl
      {
         get { return this.m_IconUrl; }
         set
         {
            this.m_IconUrl = value;
            this.RaisePropertyChanged ("IconUrl");
         }
      }

      /// <summary>
      /// Gets or Sets the command for the menu item to execute.
      /// </summary>
      public ICommand Command { get; set; }
   }
}
